package com.miszczu.tests;

import static org.junit.Assert.*;

import java.util.List;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;



import com.miszczu.dao.MessagesDao;
import com.miszczu.dao.MessagesDaoImpl;
import com.miszczu.dao.UsersDao;
import com.miszczu.model.Messagesreceived;
import com.miszczu.model.Users;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration
public class DaoTests {


	@Autowired
	MessagesDao messagesDao;
	
	@Autowired
	UsersDao usersDao;
	
	
	@Before
	public void setUp() {
		
	}
	
	@Test
	public void MessagesDaoTest() {
		
		Users user = usersDao.getOne(15);
		assertNotNull(user);
		
		//List<Messagesreceived> messagesList = messagesDao.getReceivedMessages(user);
		
		//assertEquals(messagesList.size(), 1);
		
	}

}
